package com.hu.video.service.impl;

import com.hu.video.mapper.SocialFollowMapper;
import com.hu.video.service.ISocialFollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SocialFollowServiceImpl implements ISocialFollowService {
    @Autowired
    private SocialFollowMapper socialFollowMapper;

    @Override
    public boolean follow(Long followerId, Long followingId) {
        return socialFollowMapper.insertFollow(followerId, followingId) > 0;
    }

    @Override
    public boolean unfollow(Long followerId, Long followingId) {
        return socialFollowMapper.deleteFollow(followerId, followingId) > 0;
    }
} 